import request from '@/utils/request'
import {encrypt} from "@/utils/jsencrypt";

// 查询岗位列表
export function listWarehouse(query) {
  return request({
    url: '/wm/warehouse/list',
    method: 'get',
    params: query
  })
}

export function getWarehouse(query) {
  return request({
    url: '/wm/warehouse/listById',
    method: 'get',
    params: query
  })
}

export function updateWarehouse(data) {
  return request({
    url: '/wm/warehouse/update',
    method: 'post',
    data
  })
}
export function delWarehouse(query) {
  return request({
    url: '/wm/warehouse/del',
    method: 'get',
    params: query
  })
}

export function addWarehouse(data) {
  data.warehouseCode = encrypt(data.warehouseCode)
  return request({
    url: '/wm/warehouse/add',
    method: 'post',
    data
  })
}
